/* SPDX-License-Identifier: GPL-2.0 */

#ifndef _LINUX_MCE_CUSTOM_HANDLER_H
#define _LINUX_MCE_CUSTOM_HANDLER_H

#ifdef CONFIG_EULEROS_ENHANCED_UCE_PATROL_SCRUB_ERROR
extern int mce_check_not_panic(struct mce *m);
extern void mce_count_mem_err(struct mce *m);
extern int mce_check_mem_err(void);
extern int mce_mem_isolate(struct mce *m);
extern void do_notify_mce_panic(void);
extern void do_mce_check_not_panic(struct mce *m, int *severity);
#else
static inline void do_notify_mce_panic(void) {}
static inline void do_mce_check_not_panic(struct mce *m, int *severity) {}
static inline void mce_count_mem_err(struct mce *m) {}
static inline int mce_mem_isolate(struct mce *m)
{
	return 0;
}
static inline int mce_check_not_panic(struct mce *m)
{
	return 0;
}
#endif /* CONFIG_EULEROS_ENHANCED_UCE_PATROL_SCRUB_ERROR */
#endif /* _LINUX_MCE_CUSTOM_HANDLER_H */
